package com.prs.crm.service.hr.impl;

import java.io.File;
import java.util.Collection;

import com.prs.crm.context.FileUtil;
import com.prs.crm.dao.hr.LeaveAuditDao;
import com.prs.crm.domain.hr.LeaveAudit;
import com.prs.crm.domain.hr.Person;
import com.prs.crm.service.hr.LeaveAuditService;
import com.prs.crm.service.impl.BaseServiceImpl;

public class LeaveAuditServiceImpl extends BaseServiceImpl<LeaveAudit,LeaveAuditDao> implements LeaveAuditService{

	@Override
	public void saveleaveAudit(LeaveAudit leaveAudit, File file, String fileName) {
		// TODO Auto-generated method stub
		leaveAudit.setAttach(FileUtil.getInstance().createAttach(file, fileName));
		this.getDao().save(leaveAudit);
	}

	@Override
	public Collection<LeaveAudit> getAuditLeave(Person person) {
		// TODO Auto-generated method stub
		return this.getDao().getAuditLeave(person);
	}

	@Override
	public Collection<LeaveAudit> getLeaveAudit2Person(Person person) {
		// TODO Auto-generated method stub
		return this.getDao().getLeaveAudit2Person(person);
	}

}
